<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BreukenWebsite.Models.LeerlingOpdrachtDetail>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Details
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function() {
            $("#myTable").tablesorter();
        });
    </script>
    <h2>Je resultaat per vraag</h2>

    <table id="myTable" class="tablesorter">
    <thead>
        <tr>
             <th>
                #
            </th>
             <th>
                Vraag
            </th>
             <th>
                Oplossing
            </th>
            <th>
                Je antwoord
            </th>
            <th>
                Beoordeling
            </th>
        </tr>
    </thead>
    <tbody>
    <% int count = 0; %>
    <% foreach (var item in Model) { %>
    <% count++; %>
        <tr>
            <td>
            <%= Html.Encode(count) %>
            </td>
           
            <td>
            <%= Html.Encode(item.OpdrachtDetail.opgaveTekst) %>
            </td>
            
            <td>
            <%= Html.Encode(item.OpdrachtDetail.oplossingTekst) %>
            </td>
            <td>
                <%= Html.Encode(item.antwoordTekst) %>
            </td>
            <td>
               <% if (item.fout.ToString() == "1") { %> <%= Html.Encode("Fout") %> <% } else { %> <%= Html.Encode("Correct") %> <% } %>
            </td>
        </tr>
    
    <% } %>
    </tbody>
    </table>
            
    <% if (count == 0) { %>
    <p>Je hebt de opgave nog niet opgelost.</p>
    <% } %> 
    
    <div>
        <%= Html.ActionLink("_IMG_", "Index").Replace("_IMG_", "<img alt=\"Terug\" src=\"../../Content/icons/back.png\"/> Terug")%>
    </div>

</asp:Content>
